<?php

$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => \common\config\Env::$cookievalidationkey_home_and_admin,
        ],
    ],
    'params' => [],
];

if (YII_ENV!='prod') {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        'allowedIPs' => ['127.0.0.1', '::1', 'localhost', '192.168.*'],
    ];
    $config['modules']['debug']['panels']['switchUser'] = [
        'class' => \common\rewrite\microinginer\switchUser\SwitchPanel::class,
        'modelClass' => \common\models\db\User::class,
        'gridViewColumns' => [
            'email', 'mobile', 'created_at:datetime', 'level', 'integral',
            'status',
            [
                'class' => \common\components\grid\EnumColumn::class,
                'attribute' => 'status',
                'enum' => \common\models\db\User::getStatus(),
            ],
            [
                'class' => \common\components\grid\EnumColumn::class,
                'attribute' => 'is_super',
                'enum' => \common\models\db\User::getIsSuper(),
            ],
        ],
    ];
    $config['modules']['debug']['panels']['vardumper'] = [
        'class'=>'\widewhale\debug\vardumper\panels\VarDumperPanel',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['127.0.0.1', '::1', 'localhost', '192.168.*'],
    ];
}

return $config;
